﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head><link rel="stylesheet" href="${ctx}/common/common.css">
    <title>Title</title>
    <link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/style/admin.css" media="all">
    <script src="${ctx}/common/plugins/layuiadmin/layui/layui.js"></script>
    
    <script src="${ctx}/common/plugins/jquery-1.10.2.min.js"></script>
</head>
<body>
<form class="layui-form" action="${ctx}/material/materialSave">
    <input type="hidden" name="id" value="${material.id}"/>
    <div class="layui-form-item layui-col-md5" style="margin-top: 50px">
        <label class="layui-form-label">物料名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="${material.name}"  readonly lay-verify="required"  disabled  placeholder="请输入物料名称" autocomplete="on"   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">物料类别</label>
        <div class="layui-input-block">
            <input type="text" name="materialType" value="${materialType.described}" readonly lay-verify="required"   disabled  placeholder="请选择物料类别" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">物料编号</label>
        <div class="layui-input-block">
            <input type="text" name="code" value="${material.code}" readonly lay-verify="required"   disabled  placeholder="请输入物料编号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">规格</label>
        <div class="layui-input-block">
            <input type="text" name="specifications" value="${material.specifications}" lay-verify="required"    disabled placeholder="请输入规格" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">参考价格</label>
        <div class="layui-input-block">
            <input type="text" name="price" value="${material.price}" lay-verify="required"  disabled   placeholder="请输入参考价格" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">有效期天数</label>
        <div class="layui-input-block">
            <input type="text" name="expiryDate" value="${material.expiryDate}" lay-verify="required"  disabled   placeholder="请输入有效期天数" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">生产厂家</label>
        <div class="layui-input-block">
            <input type="text" name="manufacturer" value="${material.manufacturer}" lay-verify="required"   disabled  placeholder="请输入生产厂家" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">生产许可编号</label>
        <div class="layui-input-block">
            <input type="text" name="pLicense" value="${material.pLicense}" lay-verify="required"   disabled  placeholder="请输入生产许可编号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">执行标准</label>
        <div class="layui-input-block">
            <input type="text" name="perfStandard" value="${material.perfStandard}" lay-verify="required"  disabled   placeholder="请输入执行标准" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">单件重量</label>
        <div class="layui-input-block">
            <input type="text" name="singleWeight" value="${material.singleWeight}" lay-verify="required"  disabled   placeholder="请输入单件重量" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">单件容量</label>
        <div class="layui-input-block">
            <input type="text" name="singleCapacity" value="${material.singleCapacity}" lay-verify="required"  disabled   placeholder="请输入单件容量" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">单件体积</label>
        <div class="layui-input-block">
            <input type="text" name="singleVolume" value="${material.singleVolume}" lay-verify="required"  disabled   placeholder="请输入单件体积" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input type="text" name="createTime"   disabled value="<fmt:formatDate value="${material.createTime}"   pattern="yyyy-MM-dd"/>" lay-verify="required"   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">创建人</label>
        <div class="layui-input-block">
            <input type="text" name="creatorName" value="${material.creatorName}"  disabled lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5" id="packageCodeDiv" ${materialType.classify eq 'packagingClassify' ? '':'style="display: none"'} >
        <label class="layui-form-label">是否生成码</label>
        <div class="layui-input-block">
            <c:if test="${material.createCode eq '1'}">

                <input type="text"  value="生成"  disabled class="layui-input">
            </c:if>
            <c:if test="${material.createCode eq '2'}">

                <input type="text"  value="不生成"  disabled class="layui-input">
            </c:if>
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">单位</label>
        <div class="layui-input-block">
            <input type="text" name="unit" value="${material.unit}" lay-verify="required"   placeholder="单位" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">物料图片</label>
        <div class="layui-input-block" id="materialsImg">
            <c:if test="${!empty material.mTimg && fn:length(material.mTimg)>0 && material.mTimg != 'null'}">
                <img src="${ctx}${material.mTimg}" class="imga" style="width: 100px;height: 100px;">
            </c:if>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" id="rollback" class="layui-btn layui-btn-primary">返回</button>
        </div>
    </div>
</form>
<script>
    document.getElementById("rollback").addEventListener("click",function(){
        window.history.back();
    })
</script>
</body>
</html>



